package com.atguigu.spzx.user.config;

import jakarta.annotation.PostConstruct;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @author LT
 * @create 2023-11-20-16:30
 */
@ConfigurationProperties(prefix = "aliyun.sms")
@Data
public class SmsProperties {
    private String host;
    private String path;
    private String method;
    private String appcode;
    private String templateId;

    public static String HOST;
    public static String PATH;
    public static String METHOD;
    public static String APPCODE;
    public static String TEMPLATE_ID;

    @PostConstruct
    public void init(){
        HOST = this.host;
        PATH = this.path;
        METHOD = this.method;
        APPCODE = this.appcode;
        TEMPLATE_ID = this.templateId;
    }
}
